package com.bzframework.core.auth.config;

import com.bzframework.core.auth.manager.DefaultUserTokenManager;
import com.bzframework.core.auth.manager.UserTokenManager;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;

/**
 * UserTokenConfiguration 用户token自动配置
 */
public class UserTokenAutoConfiguration {

    @Bean
    @ConditionalOnProperty(prefix = "bzframework.user-token", name = "type", havingValue = "local", matchIfMissing = true)
    public UserTokenManager defaultUserTokenManager() {
        return new DefaultUserTokenManager();
    }


}
